-
-
Notifications
You must be signed in to change notification settings - Fork 1
Improve api granularity to empower MCP server #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@GabrielBarberini has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 21 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (12)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new endpoints to create and update rockets and flights using references to existing resources (motors, environments, rockets) instead of requiring full nested objects. The implementation adds "from-reference" variants of existing POST and PUT endpoints.
Key changes:
- New request models (
RocketWithMotorReferenceRequest,FlightWithReferencesRequest) and partial models (RocketPartialModel,FlightPartialModel) that exclude referenced resources - Controller methods to load referenced resources and assemble complete models before persisting
- Route handlers for
/rockets/from-motor-reference,/rockets/{id}/from-motor-reference,/flights/from-references, and/flights/{id}/from-references
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/rocket.py | Added RocketPartialModel and RocketWithMotorReferenceRequest for motor-referenced rocket creation |
| src/models/flight.py | Added FlightPartialModel and FlightWithReferencesRequest for referenced flight creation |
| src/controllers/rocket.py | Implemented create_rocket_from_motor_reference and update_rocket_from_motor_reference methods with motor loading logic |
| src/controllers/flight.py | Implemented create_flight_from_references and update_flight_from_references methods with environment/rocket loading logic |
| src/routes/rocket.py | Added POST and PUT endpoints for motor-referenced rocket operations |
| src/routes/flight.py | Added POST and PUT endpoints for reference-based flight operations |
| tests/unit/test_routes/test_rockets_route.py | Added comprehensive tests for new rocket endpoints including success and error scenarios |
| tests/unit/test_routes/test_flights_route.py | Added comprehensive tests for new flight endpoints including success and error scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
Release Notes
New Features
Tests